<?
include_once "../../mode/lang/error.php";
//include_once "../../mode/message/voteAction.php";
include_once "../../mode/message/blog.php";
include_once "../../mode/table/tbhelper.php";

$db = new db("mysql:host=localhost;dbname=sns","zyn","zyn");
//print_r(tbhelper::produce("dairy"));
$tip = new blog($db,tbhelper::produce("dairy")); 
$data = array();

$data['id']= 1 ; //ID
$data['pwd']=1234;

//$data['pwd']='zynzyn';
//print_r($data);
$tipAction = $tip->getAction(recourse::CHANGE_INFO);
$tipAction->setData($data);
//print_r($blogLockAction);
try{
	if($tipAction->checkData()){
		echo $con = $tipAction->run();
		echo "OK";
	}
	else{
		echo "CheckDataError";
	}
}
catch(Error $e){
	echo $e->getMessage()."<br /><a href='".$e->getUrl()."'>".$e->getUrlText()."</a>";
}
?>